#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define rep(Ii,Jj,Kk) for(int Ii=(Jj),Ii##_=(Kk);Ii<=Ii##_;Ii++)
#define per(Ii,Jj,Kk) for(int Ii=(Jj),Ii##_=(Kk);Ii>=Ii##_;Ii--)
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned uint;
typedef double db;
#define fir first
#define sec second
#define siz(Aa) ((int)(Aa).size())
#define all(Aa) (Aa).begin(),(Aa).end()
#define ckmx(Aa,Bb) (Aa=max(Aa,Bb))
#define ckmn(Aa,Bb) (Aa=min(Aa,Bb))
#define Fi(s) freopen(s,"r",stdin)
#define Fo(s) freopen(s,"w",stdout)
#define Fre(s) Fi(s".in"),Fo(s".out")
const int m=30;
const int dx[]={1,-1,0,0};
const int dy[]={0,0,1,-1};
const char c[6][3]={
{'R','R','R'},
{'R','G','B'},
{'R','G','B'},
{'R','R','R'},
{'R','B','G'},
{'R','B','G'}
};
const char e[6][3]={
{'B','B','B'},
{'B','G','R'},
{'B','G','R'},
{'B','B','B'},
{'B','R','G'},
{'B','R','G'}
};
int n;
string s,a[m],ans;
db d(int x,int y){return hypot(x-15.5,y-15.5);}
void dfs(int x,int y,int id){
	if(id==n){
		cout<<ans<<"\n";
		exit(0);
	}
	vector<pair<db,int>> v;
	rep(w,0,3){
		int xx=x+dx[w];
		int yy=y+dy[w];
		if(xx<0 || xx>=m || yy<0 || yy>=m) continue;
		if(a[xx][yy]!=s[id]) continue;
		v.emplace_back(d(xx,yy),w);
	}
	sort(all(v));
	for(auto[val,w]:v){
		ans[id-1]="DURL"[w];
		dfs(x+dx[w],y+dy[w],id+1);
	}
}
signed main(){ios::sync_with_stdio(false),cin.tie(nullptr);
	Fre("snake");
	cin>>s;
	n=siz(s);
	if(s[0]=='R'){
		rep(i,0,m-1){
			a[i].resize(m);
			rep(j,0,m-1) a[i][j]=e[i%6][j%3];
		}
	}else{
		rep(i,0,m-1){
			a[i].resize(m);
			rep(j,0,m-1) a[i][j]=c[i%6][j%3];
		}
	}
	cout<<m<<" "<<m<<"\n";
	rep(i,0,m-1) cout<<a[i]<<"\n";
	int sx=0,sy=0;
	rep(i,0,m-1) rep(j,0,m-1) if(a[i][j]==s[0] && d(i,j)<d(sx,sy)) sx=i,sy=j;
	ans.resize(n-1);
	cout<<sx+1<<" "<<sy+1<<"\n";
	dfs(sx,sy,1);
	cout<<"Genshin\n";
return 0;}
/*
*/